﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;


namespace WebApplication91
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Buttonregisterme_Click(object sender, EventArgs e)
        {
            string strcon =@"Data Source=.\sqlexpress;Initial Catalog=HMS;Integrated Security=True";
            SqlConnection con = new SqlConnection(strcon);

            SqlCommand com = new SqlCommand("storlogin134", con);
            com.CommandType = CommandType.StoredProcedure;
            SqlParameter p1 = new SqlParameter("username", TextBoxusername.Text);
            SqlParameter p2 = new SqlParameter("email", TextBoxemail.Text);
            SqlParameter p3 = new SqlParameter("password", TextBoxpassword.Text);
            com.Parameters.Add(p1);
            com.Parameters.Add(p2);
            com.Parameters.Add(p3);
            con.Open();
            com.ExecuteNonQuery();
            Labelinfo.Text = "registered successful.";
            
        }
    }
}